package net.sk.china.common.exception;

import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 自定义异常
 * +----------------------------------------------------------------------
 * | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2018-2024 聊来All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * +----------------------------------------------------------------------
 * | @Author: 聊来 <18970881148@qq.com>
 * +----------------------------------------------------------------------
 * | DateTime: 2024/6/2 11:53
 * +----------------------------------------------------------------------
 */

@RestControllerAdvice
public class TalkException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private int code;

    public TalkException() {}

    public TalkException(String message) {
        super(message);
    }

    public TalkException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}
